﻿<Window x:Class="EntLibContrib.Mapping.QuickStart.DomainObjectViewer"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:t="http://schemas.microsoft.com/wpf/2008/toolkit"
	xmlns:local="clr-namespace:EntLibContrib.Mapping.QuickStart"
	Title="Domain Object Viewer" Height="350" Width="600" Name="domainObjectViewerWindow" AllowsTransparency="False" Icon="/EntLibContrib.Mapping.QuickStart;component/App.ico" WindowStartupLocation="CenterScreen">
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="ImageDictionary.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Name="windowRow" Height="*" />
			<RowDefinition Name="statusRow" Height="Auto" />
		</Grid.RowDefinitions>
		<DockPanel Name="mainDockPanel" Grid.Row="0">
			<Menu Height="26.146" Name="mainMenu" DockPanel.Dock="Top">
				<MenuItem Header="_File" Name="fileMenuItem">
					<MenuItem Header="_Save" Name="saveMenuItem" InputGestureText="Alt+S" Click="OnSave">
						<MenuItem.Icon>
							<Image Height="16" Width="16" Source="{StaticResource Save}"/>
						</MenuItem.Icon>
					</MenuItem>
					<MenuItem Header="_Refresh" Name="refreshMenuItem" InputGestureText="Alt+R" Click="OnRefresh">
						<MenuItem.Icon>
							<Image Height="16" Width="16" Source="{StaticResource Refresh}"/>
						</MenuItem.Icon>
					</MenuItem>
					<Separator />
					<MenuItem Header="E_xit" Name="exitMenuItem" InputGestureText="Alt+X" Click="OnExit">
						<MenuItem.Icon>
							<Image Height="16" Width="16" Source="{StaticResource Exit}"/>
						</MenuItem.Icon>
					</MenuItem>
				</MenuItem>
			</Menu>
			<ToolBar Height="26.146" Name="mainToolBar" Width="Auto" VerticalAlignment="Top" DockPanel.Dock="Top">
				<Button Name="saveButton" Click="OnSave">
					<Image Source="{StaticResource Save}"></Image>
				</Button>
				<Button Name="refreshButton" Click="OnRefresh">
					<Image Source="{StaticResource Refresh}"></Image>
				</Button>
				<Button Name="exitButton" Click="OnExit">
					<Image Source="{StaticResource Exit}"></Image>
				</Button>
			</ToolBar>
			<Grid Height="Auto" Name="contentGrid" Width="Auto" DockPanel.Dock="Bottom" DataContext="{Binding ElementName=domainObjectListBox, Path=SelectedItem}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Name="listColumn" Width="247.39*" />
					<ColumnDefinition Name="splitterColumn" Width="2*" />
					<ColumnDefinition Name="propertiesColumn" Width="315.285*" />
				</Grid.ColumnDefinitions>
				<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" Margin="0" Name="contentGridSplitter" Width="2" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
				<ListBox Margin="0" Name="domainObjectListBox" DisplayMemberPath="SampleString" />
				<TabControl Grid.Column="2" Margin="0" Name="domainObjectTabControl">
					<TabItem Header="Properties" Name="propertiesTabItem">
						<Grid Name="propertyGrid" VerticalAlignment="Top">
							<Grid.RowDefinitions>
								<RowDefinition Name="sampleStringRow" Height="33.067*" />
								<RowDefinition Name="sampleBooleanRow" Height="34.898*" />
								<RowDefinition Name="sampleDateRow" Height="33.836*" />
								<RowDefinition Name="sampleIntRow" Height="33.836*" />
								<RowDefinition Name="sampleDecimalRow" Height="33.836*" />
								<RowDefinition Name="ownerRow" Height="33.836*" />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Name="propertyLabelColumn" Width="119.964*" MaxWidth="120" MinWidth="50" />
								<ColumnDefinition Name="PropertyValueColumn" Width="192.761*" />
							</Grid.ColumnDefinitions>
							<Label Grid.Row="0" Margin="0" Name="sampleStringLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Sample String</Label>
							<TextBox Grid.Row="0" Grid.Column="1" Margin="5" Name="sampleStringValueTextBox" Text="{Binding Path=SampleString}" LostFocus="OnCheckStatus" />
							<Label Grid.Row="1" Margin="0" Name="sampleBooleanLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Sample Boolean</Label>
							<CheckBox Grid.Column="1" Grid.Row="1" Margin="5" Name="sampleBooleanValueCheckBox" VerticalContentAlignment="Center" HorizontalAlignment="Left" HorizontalContentAlignment="Left" IsEnabled="True" IsTabStop="True" VerticalAlignment="Center" Padding="0" IsChecked="{Binding Path=SampleBoolean}" LostFocus="OnCheckStatus"></CheckBox>
							<Label Grid.Row="2" Margin="0" Name="sampleDateLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Sample Date</Label>
							<t:DatePicker Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Name="sampleDatePicker" BorderThickness="0" SelectedDate="{Binding Path=SampleDate}" LostFocus="OnCheckStatus" />
							<Label Grid.Row="3" Margin="0" Name="sampleIntLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Sample Integer</Label>
							<TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="sampleIntValueTextBox" Text="{Binding Path=SampleInt}" local:TextBoxMaskBehavior.Mask="Integer" LostFocus="OnCheckStatus" />
							<Label Grid.Row="4" Margin="0" Name="sampleDecimalLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Sample Decimal</Label>
							<TextBox Grid.Row="4" Grid.Column="1" Margin="5" Name="sampleDecimalValueTextBox" Text="{Binding Path=SampleDecimal}" local:TextBoxMaskBehavior.Mask="Decimal" LostFocus="OnCheckStatus" />
							<Label Grid.Row="5" Margin="0" Name="ownerLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Owner</Label>
							<Label Grid.Row="5" Grid.Column="1" Grid.RowSpan="1" Margin="0" Name="ownerValueLabel" Content="{Binding Path=Owner.Name}"></Label>
						</Grid>
					</TabItem>
					<TabItem Header="Audit" Name="auditTabItem">
						<Grid Name="auditGrid" VerticalAlignment="Top">
							<Grid.RowDefinitions>
								<RowDefinition Name="createdIdentityRow" Height="33.067*" />
								<RowDefinition Name="createdDateRow" Height="34.898*" />
								<RowDefinition Name="updatedIdentityRow" Height="33.836*" />
								<RowDefinition Name="updatedDateRow" Height="33.836*" />
								<RowDefinition Name="deletedIdentityRow" Height="33.836*" />
								<RowDefinition Name="deletedDateRow" Height="33.836*" />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Name="auditLabelColumn" Width="119.964*" MaxWidth="120" MinWidth="50" />
								<ColumnDefinition Name="auditValueColumn" Width="192.761*" />
							</Grid.ColumnDefinitions>
							<Label Grid.Row="0" Margin="0" Name="createdIdentityLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Created By</Label>
							<Label Grid.Row="0" Grid.Column="1" Margin="0" Name="createdIdentityValueLabel" Content="{Binding Path=Audit.CreatedIdentity.Name}"></Label>
							<Label Grid.Row="1" Margin="0" Name="createdDateLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Created Date</Label>
							<Label Grid.Row="1" Grid.Column="1" Margin="0" Name="createdDateValueLabel" Content="{Binding Path=Audit.CreatedDate}"></Label>
							<Label Grid.Row="2" Margin="0" Name="updatedIdentityLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Updated By</Label>
							<Label Grid.Row="2" Grid.Column="1" Margin="0" Name="updatedIdentityValueLabel" Content="{Binding Path=Audit.UpdatedIdentity.Name}"></Label>
							<Label Grid.Row="3" Margin="0" Name="updatedDateLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Updated Date</Label>
							<Label Grid.Row="3" Grid.Column="1" Margin="0" Name="updatedDateValueLabel" Content="{Binding Path=Audit.UpdatedDate}"></Label>
							<Label Grid.Row="4" Margin="0" Name="deletedIdentityLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Deleted By</Label>
							<Label Grid.Row="4" Grid.Column="1" Margin="0" Name="deletedIdentityValueLabel" Content="{Binding Path=Audit.DeletedIdentity.Name}"></Label>
							<Label Grid.Row="5" Margin="0" Name="deletedDateLabel" HorizontalContentAlignment="Right" ClipToBounds="False" VerticalAlignment="Center" VerticalContentAlignment="Center">Deleted Date</Label>
							<Label Grid.Row="5" Grid.Column="1" Margin="0" Name="deletedDateValueLabel" Content="{Binding Path=Audit.DeletedDate}"></Label>
						</Grid>
					</TabItem>
				</TabControl>
			</Grid>
		</DockPanel>
		<StatusBar Grid.Row="1" VerticalAlignment="Bottom" VerticalContentAlignment="Center" Name="mainStatusBar">
			<StatusBarItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="1">
				<Label Name="itemCountLabel" FontSize="10" Padding="1"/>
			</StatusBarItem>
			<Separator />
			<StatusBarItem HorizontalAlignment="Right" BorderThickness="1">
				<Label Name="saveRequiredLabel" FontSize="10" Padding="1"/>
			</StatusBarItem>
		</StatusBar>
	</Grid>
</Window>
